#include <scsi/scsi_device.h>

#define DEFAULT_SCSI_CMD_SIZE 32
#define DEFAULT_SCSI_TIMEOUT (3 * HZ)
#define DEFAULT_SCSI_RETRIES 3
#define DEFAULT_SCSI_OUT_BUFF_LEN 32

typedef struct tag_scsi_cmd scsi_cmd_t;
typedef void (*build_scsi_cmd_t)(scsi_cmd_t *);

struct tag_scsi_cmd
{
    struct scsi_device *sdev;
	unsigned char scsi_cmd[DEFAULT_SCSI_CMD_SIZE];
    unsigned char *data_out_buffer;
    unsigned int data_out_buffer_len;
    int timeout;
    int retries;
    int status;
    struct scsi_exec_args exec_args;
    int  (*callback)(scsi_cmd_t *);
};

void build_scsi_tur_cmd(scsi_cmd_t *cmd);
void build_scsi_inquiry_cmd(scsi_cmd_t *cmd);
void build_scsi_inquiry_0x00_cmd(scsi_cmd_t *cmd);
void build_scsi_inquiry_0x80_cmd(scsi_cmd_t *cmd);
void build_scsi_inquiry_0x83_cmd(scsi_cmd_t *cmd);
